﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Prism.Games.GalEngine.Scripts.Data.ResourceCollection;
using Prism.Games.GalEngine.Scripts.FunctionModel;

namespace Prism.Games.GalEngine.Scripts.Data.BranchSystem
{
    /// <summary>
    /// 分支。提供给Section结束时，进行的分支跳转的逻辑。
    /// </summary>
    [Serializable]
    public class Branch : Prism.Games.GalEngine.Scripts.FunctionModel.SectionObject, IItemIncrementalMarkableHost
    {
        public Branch(IItemIncrementalMarkable host)
        {
            this.SectionJumpers = new SectionJumperCollection();
            this.Host = host;
        }

        private SectionJumperCollection sectionJumpers;

        public SectionJumperCollection SectionJumpers
        {
            get { return sectionJumpers; }
            set
            {
                if (this.sectionJumpers != value)
                {
                    sectionJumpers = value;
                    this.OnPropertyChanged("SectionJumpers");
                }
            }
        }

        public IItemIncrementalMarkable Host
        {
            get;
            set;
        }
    }
}